package com.orangeforms.webadmin.upms.dao;

import com.orangeforms.common.core.base.dao.BaseDaoMapper;
import com.orangeforms.webadmin.upms.model.AttachResource;

import java.util.List;

/**
 * 附件资源Mapper
 *
 * @Author：howlrou
 * @Date：2024/8/14 16:00
 */
public interface BusinessAttachResourceMapper extends BaseDaoMapper<AttachResource> {
    /**
     * 查询附件资源存储
     *
     * @param digitalResourceId 附件资源存储主键
     * @return 附件资源存储
     */
    public AttachResource selectDigitalResourceByDigitalResourceId(Long digitalResourceId);

    /**
     * 查询附件资源存储列表
     *
     * @param attachResource 附件资源存储
     * @return 附件资源存储集合
     */
    public List<AttachResource> selectDigitalResourceList(AttachResource attachResource);

    /**
     * 新增附件资源存储
     *
     * @param attachResource 附件资源存储
     * @return 结果
     */
    public int insertDigitalResource(AttachResource attachResource);

    /**
     * 修改附件资源存储
     *
     * @param attachResource 附件资源存储
     * @return 结果
     */
    public int updateAttachResource(AttachResource attachResource);

    /**
     * 删除附件资源存储
     *
     * @param digitalResourceId 附件资源存储主键
     * @return 结果
     */
    public int deleteDigitalResourceByDigitalResourceId(Long digitalResourceId);

    /**
     * 批量删除附件资源存储
     *
     * @param digitalResourceIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteDigitalResourceByDigitalResourceIds(Long[] digitalResourceIds);

    /**
     * 根据藏品Id删除
     *
     * @return
     */
    public int deleteByCollectionId(Long collectionId);
}
